package com.woniuxy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.woniuxy.domain.Recordbug;
import com.woniuxy.dto.DtoSubmitBugInfoVO;
import com.woniuxy.parameter.PageParam;
import com.woniuxy.parameter.QueryBugParam;
import com.woniuxy.dto.*;
import org.apache.ibatis.annotations.Param;

import java.lang.reflect.InvocationTargetException;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author XXX
 * @since 2021-05-12
 */
public interface RecordbugService extends IService<Recordbug> {
    public List<Recordbug> queryRecordbug(String classify, Date date1, Date date2);

    public List<Recordbug> queryRecordbugState(String dostate, Date date1, Date date2);

    public List<Recordbug> queryRecordbugDegree(String degree, Date date1, Date date2);

    /*获取登录用户所有缺陷任务*/
    DtoMyPage<DtoSubmitBugInfo> searchForAllBug(int current, int size, int userId) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    /*获取登录用户所处理的所有bug的所属项目*/
    ArrayList<Integer> searchForAllProject(int userId);

    /*模糊查询该登录用户所查询相关缺陷内容*/
    ArrayList<DtoSubmitBugInfo> searchByInfo(String projectId, String state, String info, int userId) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    boolean updateState(DtoSubmitBugInfoVO dtoSubmitBugInfoVO);

    public PageInfo queryBugByNameOrState(QueryBugParam queryBugParam, PageParam pages);

    /*获取当前所有项目*/
    ArrayList<Integer> getAllProjectClass();

    /*获取该项目各缺陷分类数量统计*/
    DtoProjectInfoOfClassify countProjectClassify(int projectId);

    /*获取该项目各缺陷状态数量统计*/
    DtoProjectInfoOfState countProjectState(int projectId);

    /*获取该项目各缺陷严重程度数量统计*/
    DtoProjectInfoOfDegree countProjectDegree(int projectId);

}
